import { useRoutes } from "react-router-dom";
import Login from '../pages/Login/Login'
import Home from '../pages/Home/Home'
import News1 from '../components/新闻/新闻1'
import News2 from '../components/新闻/新闻2'
import TodoList from "../components/新闻/TodoList";
// import Header from "../components/案例/评论/Header";
// import List from "../components/案例/评论/List";

const Routes = () => {
    return useRoutes([
        {
        path: '/',
        element: <Login />
        },
        {
            path: '/login',
            element: <Login />
        },
        {
        path: '/home',
        element: <Home />,
        children:[
            {
                index: true,
                path:'/home/news1',
                element: <News1 /> 
            },
            {
               path:"/home/news2",
               element: <News2 /> 
            },   
            {
               path:"/home/todolist",
               element: <TodoList />,
            }     
        ]
        },
        
    ])
}

export default Routes